<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"  
    xmlns:p="http://primefaces.org/ui" 
    xmlns:ui="http://java.sun.com/jsf/facelets"> 
  
    <h:head>  
  	   <h:outputStylesheet library="css" name="main.css" />
  	</h:head>
  	   
  	<div id="main" class="container"> 
  		<div id="header" class="header">
    		<h1>Banco Norne S/A</h1>
  		</div>
  	   
    <h:body>
  
  				
	<h:form id="formConta">
	
		<h:messages style="color:red;margin:8px;" />
			
			<p:panelGrid columns="2" style="horizontal-align:center" styleClass="content">			
				<h:outputLabel for="cpfcnpj" value="#{msgs.inscricao}"  /><br/> 
				<h:inputText id="cpfcnpj" value="#{intranetMB.cliente.nuInscricao}" /><br/><br/> 
				
				<h:commandButton action="#{intranetMB.ConsultarContas()}" value="#{msgs.consultar}"/> <br/>
					 
			</p:panelGrid>	
			
			
		<h:dataTable value="#{intranetMB.contas}" var="conta" styleClass="table" headerClass="tableColumnsHeader" rowClasses="tableFirstLine,tableNextLine"> 
			<h:inputHidden value="#{conta.pkConta}" />
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.tipoConta}" />
					<f:attribute name="width" value="20%" />
				</f:facet>
				
				<h:outputText value="#{conta.tipoConta}" />
				
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.nome}" />
					
				</f:facet>
				
				<h:outputText value="#{conta.cliente.nome}" />
				<f:attribute name="width" value="20%" />
			</h:column>
		
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.inscricao}" />		
		
				</f:facet>
				
				<h:outputText value="#{conta.cliente.nuInscricao}" />
					
			</h:column>
			
					
			<h:column>		
				<h:panelGrid columns="2">
	
			<h:commandButton action="#{intranetMB.GerenciarConta()}" value="#{msgs.gerenciar}"  >
				<f:setPropertyActionListener target="#{intranetMB.conta}" value="#{conta}" />
			</h:commandButton>
				</h:panelGrid>
	
			</h:column>
			
		</h:dataTable>


</h:form>
	</h:body>
	  	<div id="trailer" class="footer"> 
    		<h5><a href="menu_intra.xhtml">retornar</a></h5>
  		</div>	
  		</div>

</html>